<?php require 'header.php';?>
<?php
require 'db.php';
if(isset($UserDN))$masv=$UserDN;
$sqldk="SELECT dbo_monhoc.MaMH, TenMH, dbo_noidung.TenNhom, ThanhTich,NhanXet,Thuong FROM dbo_monhoc, dbo_noidung, dbo_dondangky";
$sqldk.=" WHERE dbo_noidung.MaNhom=dbo_dondangky.MaNhom and dbo_noidung.MaMH=dbo_monhoc.MaMH and MaSV=:masv ";
$stmt = $db->prepare($sqldk);
$stmt->bindParam(":masv",$masv,PDO::PARAM_STR);
$stmt->execute();

?>
<div class="panel panel-primary">
	<div class="panel-heading">KẾT QUẢ THI ĐẤU</div>
	<div class="panel-body">
	<div id="divDMHP">
	<div id="divKQHT">
			<table  class="table table-bordered table-hover" style="font-size: 13px;">
			<thead>
			<tr class="info"><th>STT</th><th>Mã thể thao</th><th>Tên môn thể thao</th><th>Nội dung</th><th>Thành tích</th><th>Nhận xét</th><th>Thưởng</th></tr></thead>
			<tbody>
			<?php $i=1;
			if($stmt->execute()){
				while($r=$stmt->fetch()){
			?>
				<tr>
					<td><?php echo $i++;?></td>
					<td><?php echo $r['MaMH'];?></td>
					<td><?php echo $r['TenMH'];?></td>
					<td><?php echo $r['TenNhom'];?></td>
					<td><?php echo $r['ThanhTich'];?></td>
					<td><?php echo $r['NhanXet'];?></td>
					<td><?php echo $r['Thuong'];?></td>
			<?php }} ?>	
			</tbody>
			</table>
		 	</div>
	</div>
	</div>
	
</div>
<?php require 'footer.php';?>
